Matthias Clasen [Sat, 19 Nov 2011 23:13:42 +0000 (18:13 -0500)]
Remove leftover debug spew
Matthias Clasen [Sat, 19 Nov 2011 23:08:18 +0000 (18:08 -0500)]
Add a missing static
Matthias Clasen [Sat, 19 Nov 2011 22:57:08 +0000 (17:57 -0500)]
Fix the build
Matthias Clasen [Sat, 19 Nov 2011 21:15:46 +0000 (16:15 -0500)]
Updates
Matthias Clasen [Sat, 19 Nov 2011 20:32:12 +0000 (15:32 -0500)]
Drop the Beagle search engine
It is not actively maintained.
Michel Dänzer [Sat, 19 Nov 2011 17:23:27 +0000 (12:23 -0500)]
Fix gdk_cairo_region_create_from_surface on big endian
gdk_cairo_region_create_from_surface doesn't work correctly on PPC.
This is most prominently seen with the GTK window resize grip, the
shape of which is mirrored every eight pixels horizontally.
At the same time, use an A1 surface for the resize grip shape to
eliminates an A8->A1 surface conversion.
Michael Natterer [Fri, 18 Nov 2011 15:42:25 +0000 (16:42 +0100)]
gdk: remove the GET_EFFECTIVE_KEYMAP() stuff from gdkkeys-x11.c
We don't support passing a NULL keymap any longer. Also pull some
precondition checks into the parent class.
Michael Natterer [Fri, 18 Nov 2011 14:26:09 +0000 (15:26 +0100)]
gdk_x11_keymap_get_modifier_mask(): always return a value
Michael Natterer [Fri, 18 Nov 2011 14:14:31 +0000 (15:14 +0100)]
Turn the private #define for the group-shifting modifier into API
Add GDK_MODIFIER_INTENT_SHIFT_GROUP to enum GdkModifierIntent
and handle it in gdk_keymap_get_modifier_mask(). Add an X11
impl of the method and return keymap_x11->group_switch_mask.
Return 0 from the default impl because we don't know.
Michael Natterer [Fri, 18 Nov 2011 11:25:03 +0000 (12:25 +0100)]
Bug 663856 - Make option-foo accelerators use the right symbol
If the keyboard group shifting modifier is *also* a normal
accelerator modifier, we need to special case it when calling
gdk_keymap_translate_keyboard_state(), so we get the right
key symbol for accelerators (for example we want Option-O,
not Option-Ø displayed in menu items). This patch should only
affect quartz where the Alt key both shifts the group and can
be used as accel modifier, and not X11 or Win32 where AltGr
is not used for accelerators.
- fix quartz' gdk_keymap_translate_keyboard_state() to return
the right consumed_modifiers
- add _gtk_translate_keyboard_accel_state() which does the
special casing
- use it everywhere instead of gdk_keymap_translate_keyboard_state()
Murray Cumming [Fri, 18 Nov 2011 10:30:07 +0000 (11:30 +0100)]
Fix tiny docs typo.
Alexander Larsson [Thu, 17 Nov 2011 11:25:56 +0000 (12:25 +0100)]
win32: make fixup_event correctly ref all GdkWindow members
This fixes some crashes related to owner changes and selections.
Alexander Larsson [Thu, 17 Nov 2011 10:59:27 +0000 (11:59 +0100)]
ref, don't unref, requestor member when copying GdkEvents
This seems like a typo, we should obviously ref the member when
copying. Apparently nobody copied GDK_SELECTION_* events...
Michael Natterer [Wed, 16 Nov 2011 23:49:42 +0000 (00:49 +0100)]
notebook: don't leak the action widgets
The notebook owns them, so it must destroy them in destroy().
(cherry picked from commit
87ebfb19fd9422de1d778396770c02e91e6481e8)
Benjamin Otte [Wed, 16 Nov 2011 23:29:30 +0000 (00:29 +0100)]
viewport: Get rid of deprecation warnings
Benjamin Otte [Wed, 16 Nov 2011 23:27:35 +0000 (00:27 +0100)]
viewport: Don't use deprecated functions
Benjamin Otte [Wed, 16 Nov 2011 23:25:15 +0000 (00:25 +0100)]
viewport: adjustments are never NULL
So there's no need to check for that in the getters.
Benjamin Otte [Wed, 16 Nov 2011 23:24:15 +0000 (00:24 +0100)]
viewport: Initialize the adjustment in the init function
Benjamin Otte [Wed, 16 Nov 2011 23:20:09 +0000 (00:20 +0100)]
viewport: Don't unset the adjustment on finalize
We unset it on destroy already. This makes it consistent with all other
scrollables.
Xan Lopez [Wed, 16 Nov 2011 21:41:57 +0000 (22:41 +0100)]
treeview: fix the build
Cosimo Cecchi [Wed, 16 Nov 2011 21:01:36 +0000 (16:01 -0500)]
treeview: use gtk_tree_view_ensure_background() consistently
In gtk_tree_view_state_flags_changed() we were setting the background on
the bin_window without the necessary "view" style class, making the
treeview render with the wrong color in some circumstances (such as when
adding an empty treeview in a window, as spotted by Brian Smith).
Cosimo Cecchi [Wed, 16 Nov 2011 20:59:47 +0000 (15:59 -0500)]
treeview: factor out gtk_tree_view_ensure_background()
We'll use it shortly.
Kjell Ahlstedt [Wed, 16 Nov 2011 08:03:12 +0000 (09:03 +0100)]
Maintain map/unmap invariants in GtkRecentChooserDialog
We used to explicitly map and unmap the child GtkRecentChooserWidget when
mapping and unmapping the dialog, respectively. Now that GtkContainer actually
unmaps child widgets (instead of avoiding that), we can assume that the
child GtkRecentChooserWidget will be unmapped when we want it to be.
This fixes a warning from gtk_widget_verify_invariants(), as we were mapping
our child widget before calling our parent class' ::map() handler. Bug #659257.
Bastien Nocera [Wed, 16 Nov 2011 18:49:54 +0000 (18:49 +0000)]
tests: Add tests for keypad keys parsing
See https://bugzilla.gnome.org/show_bug.cgi?id=606727
Bastien Nocera [Wed, 16 Nov 2011 18:47:39 +0000 (18:47 +0000)]
gtk: Parse keypad numbers correctly
Try to find keycodes for keysyms at level-0 in the keymap, but don't
fail to parse if we can find those in level-1. This fixes the
parsing of numerical keys on the keypad, which require a shift level
through Num-Lock.
https://bugzilla.gnome.org/show_bug.cgi?id=606727
Bastien Nocera [Wed, 16 Nov 2011 16:13:01 +0000 (16:13 +0000)]
tests: Check "without keycode" code path too
And see whether the output of gtk_accelerator_parse()
matches that of gtk_accelerator_parse_with_keycode()
Bastien Nocera [Wed, 16 Nov 2011 15:02:06 +0000 (15:02 +0000)]
Revert "tests: Disable accel test until fixed"
The test now works correctly.
This reverts commit
ba397a3431ee3850a72d8eab394b7ee62e65b737.
Matthias Clasen [Wed, 16 Nov 2011 05:27:14 +0000 (00:27 -0500)]
Update comment to new realities
Benjamin Otte [Wed, 16 Nov 2011 02:52:02 +0000 (03:52 +0100)]
a11y: Merge function into only caller
Also cleann up comments that are misleading now.
Benjamin Otte [Wed, 16 Nov 2011 02:47:33 +0000 (03:47 +0100)]
treeview: Call a11y functions for culmn changes directly
This way, the a11y code knows if a column was reordered, added or
removed and can do the right things instead of trying to guess and
getting it wrong.
Also, this patch finalizes the changes so that only visible columns
exist to the accessibility interface.
Benjamin Otte [Wed, 16 Nov 2011 01:40:49 +0000 (02:40 +0100)]
a11y: Unify column-by-index getting
We are only ever interested in visible columns. Invisible columns do not
exist for all a11y cares.
Benjamin Otte [Wed, 16 Nov 2011 00:32:07 +0000 (01:32 +0100)]
tests: Add an invisible column to the tree test
This one should be invisible if everything works as it should.
Benjamin Otte [Tue, 15 Nov 2011 21:29:45 +0000 (22:29 +0100)]
tests: Add checks for row/column index to accessibility-dump
Benjamin Otte [Tue, 15 Nov 2011 21:18:40 +0000 (22:18 +0100)]
tests: Don't dump stuff twice for tables
Captions and headers are printed as part of the children, so we can
avoid the duplication by just printing the name.
Benjamin Otte [Tue, 15 Nov 2011 15:45:48 +0000 (16:45 +0100)]
a11y: Use gtk_tree_view_get_n_columns()
In fact, invent our own function get_n_columns() which actually only
counts the visible functions, because that's the only ones we care
about.
The places where it's not used yet will be changed in the coming
patches.
Benjamin Otte [Tue, 15 Nov 2011 15:37:24 +0000 (16:37 +0100)]
API: treeview: Add gtk_tree_view_get_n_columns()
Benjamin Otte [Tue, 15 Nov 2011 20:30:46 +0000 (21:30 +0100)]
a11y: Fix get_column_index()
Benjamin Otte [Tue, 15 Nov 2011 19:24:51 +0000 (20:24 +0100)]
a11y: remove argument from get_column_number()
The argument was always FALSE.
Benjamin Otte [Tue, 15 Nov 2011 14:12:34 +0000 (15:12 +0100)]
treeview: Simplify a check
Use the same method as elsewhere.
Benjamin Otte [Tue, 15 Nov 2011 14:04:20 +0000 (15:04 +0100)]
treeview: Minor beautification
Benjamin Otte [Sun, 13 Nov 2011 03:43:32 +0000 (04:43 +0100)]
tests: Up the ante
Put 10000 rows into the tree-performance test, so the tests don't finish
in <1s. That's too little for profiling.
Benjamin Otte [Sun, 13 Nov 2011 03:28:52 +0000 (04:28 +0100)]
a11y: remove useless argument
The argument is unused these days, so don't confuse people with it.
Benjamin Otte [Sun, 13 Nov 2011 01:52:04 +0000 (02:52 +0100)]
a11y: Remove clean_rows function
It doesn't do anything anymore.
Benjamin Otte [Sun, 13 Nov 2011 01:47:42 +0000 (02:47 +0100)]
a11y: Don't crete cell infos for non-children
When we use a container inbetween, this ensures that the cell infos
don't replace each other in the hash table.
Benjamin Otte [Sat, 12 Nov 2011 05:37:08 +0000 (06:37 +0100)]
a11y: Make find by index lookup use the hash table again
This should give back the performance that was lost with the commit
"a11y: Make the cache lookup function inefficient".
Benjamin Otte [Sat, 12 Nov 2011 04:38:52 +0000 (05:38 +0100)]
a11y: Add a hash function for cell infos
Note that comparing the tree is not necessary as the nodes are already
unique per row.
Benjamin Otte [Sat, 12 Nov 2011 04:24:32 +0000 (05:24 +0100)]
a11y: Compute the cell index quicker
We have the node available, so we can compute it from there.
Benjamin Otte [Sat, 12 Nov 2011 04:15:53 +0000 (05:15 +0100)]
treeview: Add _gtk_rbtree_node_get_index()
.. as a replacement for _gtk_rbtree_node_find_parity(). Instead of 1 or
0, the function now returns the index of node in the complete tree
(counting from the root). And this is of course identical to the row
number.
Benjamin Otte [Sat, 12 Nov 2011 04:05:19 +0000 (05:05 +0100)]
a11y: Compute index the easy way
index is row_index * n_columns + column_index
We use it everywhere, why not here?
Benjamin Otte [Sat, 12 Nov 2011 03:56:29 +0000 (04:56 +0100)]
a11y: Redo indexing
We now index rows by actual expanded row number and don't count them
ourselves no more.
Benjamin Otte [Sat, 12 Nov 2011 03:55:32 +0000 (04:55 +0100)]
tests: Ensure the treeview is expanded
Otherwise the test code might ignore collapsed rows, which makes it go
rather fast.
Benjamin Otte [Sat, 12 Nov 2011 02:39:48 +0000 (03:39 +0100)]
treeview: Redo row tracking
Track the RBNode/RBTree instead of keeping a TreeRowReference. This is a
whole lot faster and less error-prone.
Also, notify the accessible of removal of rows before actually removing
them, so we have a chance to clean up.
Benjamin Otte [Sat, 12 Nov 2011 02:38:40 +0000 (03:38 +0100)]
widget: Add _gtk_widget_peek_accessible()
This function returns the accessible if it already exists. This way we
can call functions on the accessible from the widget itself instead of
having to rely on signals.
Benjamin Otte [Sat, 12 Nov 2011 02:20:12 +0000 (03:20 +0100)]
a11y: Remove needless checks
The cell_row_ref and cell_col_ref variables are always non-NULL, so
there's no need to check it.
Benjamin Otte [Sat, 12 Nov 2011 02:18:13 +0000 (03:18 +0100)]
a11y: Add a cell_info_get_path() function
Reads better and we only need to change it in one place.
Benjamin Otte [Sat, 12 Nov 2011 01:18:26 +0000 (02:18 +0100)]
treeview: Remove unnecessary variable
tmptree has the same value as tree everywhere, so just use tree instead.
Benjamin Otte [Fri, 11 Nov 2011 20:03:49 +0000 (21:03 +0100)]
a11y: Mark object as defunct in destroy notify
Instead of requiring a special functio to be called before just removing
from the hash table. This simplifies code a lot that used to remove from
the hash table.
Benjamin Otte [Fri, 11 Nov 2011 19:30:39 +0000 (20:30 +0100)]
a11y: Remove in_use member
After the latest changes, it is now always TRUE, so adjust the code
accordingly.
Benjamin Otte [Fri, 11 Nov 2011 19:25:14 +0000 (20:25 +0100)]
a11y: Don't garbage collect anymore
Instead, remove cell infos immediately from the hash table.
Benjamin Otte [Fri, 11 Nov 2011 19:18:09 +0000 (20:18 +0100)]
a11y: Improve cell_infos table
- Name it properly
- Make it just a set of cell_infos
Currently it's using direct hash, but as long as we don't actually
lookup stuff from it, who cares...
Benjamin Otte [Fri, 11 Nov 2011 19:11:50 +0000 (20:11 +0100)]
a11y: Implement find_cell_info() using qdata lookup
That should be orders of magnitude faster then iterating over a hash
table.
Benjamin Otte [Fri, 11 Nov 2011 19:06:20 +0000 (20:06 +0100)]
a11y: Store the cellinfo in the cell's qdata
Benjamin Otte [Fri, 11 Nov 2011 02:02:31 +0000 (03:02 +0100)]
a11y: Remove index from cellaccessible
That way we also get rid of the refresh_index function.
Benjamin Otte [Fri, 11 Nov 2011 01:52:47 +0000 (02:52 +0100)]
a11y: Don't use the cell's index anymore
We implement get_cell_index() now, so it's no longer necessary.
As a side effect, we need a different index for our hash table (which
now has a wrong name, but that will soon change).
Benjamin Otte [Fri, 11 Nov 2011 01:48:40 +0000 (02:48 +0100)]
a11y: Implement get_child_index in treeview
Benjamin Otte [Fri, 11 Nov 2011 01:19:28 +0000 (02:19 +0100)]
a11y: Implement get_child_index in treeviewaccessible
Benjamin Otte [Fri, 11 Nov 2011 00:43:54 +0000 (01:43 +0100)]
gtk: Fix compiler warnings from include fixes
Benjamin Otte [Fri, 11 Nov 2011 00:40:36 +0000 (01:40 +0100)]
a11y: Make the cache lookup function inefficient
Ahem.
This is in preparation for future changes and is not meant to stay this
way. But I want to change the hash table's keys and this is way easier
when nobody is using them.
Benjamin Otte [Fri, 11 Nov 2011 00:35:50 +0000 (01:35 +0100)]
a11y: Change function declaration
Returning an int seems way easier than having an int out argument to a
void function. Also, it doesn't lead to uninitialized memory, what a
concept!
Benjamin Otte [Fri, 11 Nov 2011 00:25:09 +0000 (01:25 +0100)]
a11y: Add a special-case for cell index querying
I could have tried to make GtkContainerCellAccessible implement
GtkCellAccessibleParent, but the current implementation of that
interface doesn't make sense for it.
Benjamin Otte [Thu, 10 Nov 2011 21:07:19 +0000 (22:07 +0100)]
a11y: Add _gtk_cell_accessible_parent_get_child_index()
This will soon replace the shenanigans we do to keep the index of cells
current.
Benjamin Otte [Thu, 7 Jul 2011 08:25:02 +0000 (10:25 +0200)]
a11y: Remove idle handler for focus notifications
Benjamin Otte [Thu, 7 Jul 2011 07:54:04 +0000 (09:54 +0200)]
a11y: Re-implement gtk_tree_view_accessible_get_n_rows()
... using the new _gtk_rbtree_find_index().
Benjamin Otte [Thu, 7 Jul 2011 07:52:24 +0000 (09:52 +0200)]
treeview: Add _gtk_rbtree_find_index()
Uses the parity to do an O(log N) search for the nth element in the
tree in display order of the treeview.
Benjamin Otte [Wed, 16 Nov 2011 03:14:00 +0000 (04:14 +0100)]
treeview: Rename "parity" to "total_count"
Now that we use it to actually count the rows instead of just even/odd,
it's better to reflect that in the variable name.
Benjamin Otte [Thu, 7 Jul 2011 06:48:06 +0000 (08:48 +0200)]
treeview: Make the parity actually store the row number
Instead of just storing the least significant bit of the row number,
store the full row number. This will soon be useful for accessibility.
But CSS could like it, too.
Benjamin Otte [Thu, 7 Jul 2011 06:47:25 +0000 (08:47 +0200)]
treeview: Remove special cases when computing parity
The parity of the nil npode is always 0, so no need to check for the nil
node first.
Benjamin Otte [Thu, 7 Jul 2011 06:46:05 +0000 (08:46 +0200)]
treeview: Only compute parity once when rendering
This shouldn't affect performance too much, but it I just found it so I
fixed it.
Stef Walter [Mon, 14 Nov 2011 09:59:10 +0000 (10:59 +0100)]
GtkSpinButton: Clarify clamping behavior in gtk_spin_button_set_range doc
* If the current value is outside the range, it will be adjusted
to fit within the range, otherwise it will remain unchanged.
https://bugzilla.gnome.org/show_bug.cgi?id=664021
Matthias Clasen [Tue, 15 Nov 2011 05:47:16 +0000 (00:47 -0500)]
Avoid double inclusion of a migration chapter
Matthias Clasen [Tue, 15 Nov 2011 05:21:56 +0000 (00:21 -0500)]
GtkTextViewAccessible: Respect display lines
This special tweak was lost when porting from GailTextUtil.
https://bugzilla.gnome.org/show_bug.cgi?id=663994
Martin Pitt [Mon, 14 Nov 2011 12:08:47 +0000 (13:08 +0100)]
Fix GDK linking for Gtk typelib and example builds
Add missing GDK linking to GIR build and examples:
GISCAN Gtk-3.0.gir
CCLD gtk-query-immodules-3.0
./.libs/libgtk-3.so: undefined reference to `gdk_keymap_get_modifier_mask'
./.libs/libgtk-3.so: undefined reference to `gdk_modifier_intent_get_type'
./.libs/libgtk-3.so: undefined reference to `gdk_window_begin_resize_drag_for_device'
./.libs/libgtk-3.so: undefined reference to `gdk_event_triggers_context_menu'
collect2: ld returned 1 exit status
CCLD grid-packing
../gtk/.libs/libgtk-3.so: undefined reference to `gdk_keymap_get_modifier_mask'
[...]
https://bugzilla.gnome.org/show_bug.cgi?id=664027
Yuri Kozlov [Mon, 14 Nov 2011 19:49:47 +0000 (23:49 +0400)]
Fixed Russian translation
Matthias Clasen [Mon, 14 Nov 2011 14:23:14 +0000 (09:23 -0500)]
GtkComboBoxAccessible: Make keybindings work
https://bugzilla.gnome.org/show_bug.cgi?id=659151
Matthias Clasen [Mon, 14 Nov 2011 14:23:01 +0000 (09:23 -0500)]
Add combobox a11y tests
Matthias Clasen [Mon, 14 Nov 2011 14:18:47 +0000 (09:18 -0500)]
Add some keybindings to the a11y entries test
Martin Pitt [Mon, 14 Nov 2011 13:32:32 +0000 (14:32 +0100)]
Fix gtk_tree_view_get_tooltip_context() transfer annotation
The default (out) transfer mode is "full", but the passed "model" pointer gets
set to gtk_tree_view_get_model() which is "transfer none". This caused Python
programs to free the model after calling this, causing crashes.
Matthias Clasen [Mon, 14 Nov 2011 13:01:23 +0000 (08:01 -0500)]
Add a link to the Windows port wiki page
C. Scott Ananian [Fri, 11 Nov 2011 21:26:12 +0000 (16:26 -0500)]
Fix uninitialized digest_len field, causing WebSocket handshake to g_assert.
g_checksum_get_digest checks to ensure that the passed digest_len is long
enough to hold the digest, before setting it to the actual length of the
digest returned. Digest_len is uninitialized in the code, so if you're
lucky it will be larger than 20 and everything will work fine. If you're
unlucky, g_checksum_get_digest will return either -1 or some number less
than 20, and the g_assert(digest_len==20) will fail.
Michael Natterer [Fri, 11 Nov 2011 22:49:21 +0000 (23:49 +0100)]
quartz: fix a race condition when waking up the CGRunLoop
Wake up the run loop unconditionally (don't check if it is waiting) because
it might go into waiting state right after we checked for it. Fixes GIMP
startup (which has a lot of GIOChannel I/O but zero NSEvents) from several
minutes to a few seconds.
(cherry picked from commit
0729cdc9a1e8003c41d3ebf20eecfe2d1b29ffbe)
Matthias Clasen [Fri, 11 Nov 2011 15:26:31 +0000 (10:26 -0500)]
GtkProgressbar: respect the range of 'fraction'
The setter should not set the property to values outside the allowed
range.
https://bugzilla.gnome.org/show_bug.cgi?id=663825
Rico Tzschichholz [Fri, 11 Nov 2011 12:06:56 +0000 (13:06 +0100)]
Fix some implicit declaration warnings
There were some includes of gtkmain.h missing
Alexander Larsson [Thu, 10 Nov 2011 20:32:50 +0000 (21:32 +0100)]
win32: Make grab cursors work again
Alexander Larsson [Thu, 10 Nov 2011 15:51:07 +0000 (16:51 +0100)]
win32: Fix gdk_win32_window_translate
We now do proper handling of existing invalid regions, and
we use ScrollDC which allows us to specify the right clip
region rather than just the bounding rect.
Dieter Verfaillie [Fri, 4 Nov 2011 08:44:35 +0000 (09:44 +0100)]
win32: fix pasting screenshots taken with PrintScreen or Alt+PrintScreen
These are found on the clipboard in the biCompression == BI_BITFIELDS &&
biBitCount >= 16 format. In this case the BITMAPINFOHEADER is followed
by three DWORD specifying the masks of the red green and blue components,
but bfOffBits was not being adjusted accordingly.
Based on Massimo's comment on bug 631384 and verified on
http://msdn.microsoft.com/en-us/library/
dd183386%28v=VS.85%29.aspx
https://bugzilla.gnome.org/show_bug.cgi?id=631384
Dieter Verfaillie [Fri, 4 Nov 2011 06:41:55 +0000 (07:41 +0100)]
win32: fix some typos
Alexander Larsson [Wed, 2 Nov 2011 15:49:55 +0000 (16:49 +0100)]
win32: Fix some warnings
Alexander Larsson [Wed, 2 Nov 2011 15:11:54 +0000 (16:11 +0100)]
win32: Hack to make statusbar menus show up visible:
Alexander Larsson [Wed, 2 Nov 2011 13:30:23 +0000 (14:30 +0100)]
win32: Ensure newly mapped toplevels are inside the workarea
This is what e.g. metacity does, and its needed to e.g. get the inital
position of the gimp dock window right.
Alexander Larsson [Wed, 2 Nov 2011 11:15:53 +0000 (12:15 +0100)]
win32: Fix placement at initial position
Positioning windows at 0,0 post creation failed, because it
was mapped with CW_USEDFAULT, but private->x/y still said 0,
so moving it to 0,0 did nothing. We now always position the
window at the right place, even when not mapped, but we
create it at CW_USEDEFAULT initially and store that position
before moving it to the right place.
This fixes the window sizing test in testgtk and the inital
position for the gimp toolbar.